#!/bin/bash
################################################################################
#    Ogame.pm Perl Ogame BOT
#    Copyright (C) 2008  <ogame.pm@gmail.com>
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
################################################################################

build_cristal () {
while true
do
        perl -e 'sleep rand(300)+300';
        echo "try to build cristal"
        ./ogbot.pl -s U50 -a build -p 1 -b cristal && break
done
}

build_metal () {
while true
do
        perl -e 'sleep rand(300)+300';
        echo "try to build metal"
        ./ogbot.pl -s U50 -a build -p 1 -b metal && break
done
}

build_elec () {
while true
do
        perl -e 'sleep rand(300)+300';
        echo "try to build elec"
        ./ogbot.pl -s U50 -a build -p 1 -b electrique && break
done
}

build_deut () {
while true
do
        perl -e 'sleep rand(300)+300';
        echo "try to build deuterium"
        ./ogbot.pl -s U50 -a build -p 1 -b deuterium && break
done
}


build_metal
build_elec
build_deut
build_cristal
build_elec
build_metal
build_deut
build_elec
build_deut
build_elec
build_cristal
build_metal
build_elec
build_cristal
build_deut
build_metal
